home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Planet Source Code Jumbo …e CD Visual Basic 1 to 7
/
3_2004-2005.ISO
/
Data
/
Zips
/
[_Time_Syn1802171072004.psc
/
cLogger.cls
< prev
next >
Wrap
Text File
|
2004-08-17
|
1KB
|
59 lines
VERSION 1.0 CLASS
BEGIN
MultiUse = -1 'True
END
Attribute VB_Name = "CLogger"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private mstrDestination As String
Public Property Get Destination() As String
Destination = mstrDestination
End Property
Public Property Let Destination(ByVal sNewValue As String)
mstrDestination = sNewValue
End Property
Public Sub StartLog()
Dim iFileNumber As Integer
iFileNumber = FreeFile
Open mstrDestination For Append As #iFileNumber
Print #iFileNumber, "===================================="
Print #iFileNumber, "LogFile Started: " & Now()
Close #iFileNumber
End Sub
Public Sub CloseLog()
Dim iFileNumber As Integer
iFileNumber = FreeFile
Open mstrDestination For Append As #iFileNumber
Print #iFileNumber, "LogFile Ended: " & Now()
Print #iFileNumber, "===================================="
Close #iFileNumber
End Sub
Public Sub LogEntry(strMessage As String)
Dim iFileNumber As Integer
iFileNumber = FreeFile
Open mstrDestination For Append As #iFileNumber
Print #iFileNumber, strMessage
Close #iFileNumber
End Sub
Private Sub Class_Terminate()
Close
End Sub